/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #5bc0eb;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a9fcb;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #5bc0eb;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #3a9fcb;
    color: white;
}

.btn-secondary {
    background-color: #fff;
    color: #5bc0eb;
    border: 1px solid #5bc0eb;
}

.btn-secondary:hover {
    background-color: #f0f8fc;
}

.btn-outline {
    background-color: transparent;
    color: #5bc0eb;
    border: 1px solid #5bc0eb;
}

.btn-outline:hover {
    background-color: #5bc0eb;
    color: white;
}

.btn-login {
    background-color: transparent;
    color: #5bc0eb;
    border: 1px solid #5bc0eb;
    padding: 8px 16px;
}

.btn-register {
    background-color: #5bc0eb;
    color: white;
    border: none;
    padding: 8px 16px;
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.nav-menu ul {
    display: flex;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    color: #666;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-menu a.active,
.nav-menu a:hover {
    color: #5bc0eb;
}

.nav-menu a.active::after,
.nav-menu a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #5bc0eb;
}

.user-actions {
    display: flex;
    gap: 10px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    flex: 2;
    justify-content: space-around;
}

.link-group {
    margin-bottom: 20px;
    min-width: 150px;
}

.link-group h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: #5bc0eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 10px;
    }
    
    .user-actions {
        margin-top: 15px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
    }
}

/* 通用组件样式 */
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #5bc0eb;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #5bc0eb;
    outline: none;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

/* 警告和提示样式 */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(91, 192, 235, 0.3);
    border-radius: 50%;
    border-top-color: #5bc0eb;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tag-primary {
    background-color: #5bc0eb;
    color: white;
}

.tag-secondary {
    background-color: #6c757d;
    color: white;
}

.tag-success {
    background-color: #28a745;
    color: white;
}

.tag-danger {
    background-color: #dc3545;
    color: white;
}

.tag-warning {
    background-color: #ffc107;
    color: #212529;
}

.tag-info {
    background-color: #17a2b8;
    color: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination-item {
    margin: 0 5px;
}

.pagination-link {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination-link:hover,
.pagination-link.active {
    background-color: #5bc0eb;
    color: white;
    border-color: #5bc0eb;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb-item a {
    color: #666;
}

.breadcrumb-item.active {
    color: #5bc0eb;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 进度条 */
.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background-color: #5bc0eb;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #5bc0eb;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-in-out;
}

/* 管理员特定样式 */
.admin-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.admin-panel {
    background-color: #343a40;
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-weight: 500;
}

.admin-sidebar {
    background-color: #343a40;
    color: white;
    padding: 20px 0;
    height: 100%;
}

.admin-sidebar-menu {
    list-style: none;
}

.admin-sidebar-item {
    padding: 10px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-sidebar-item:hover,
.admin-sidebar-item.active {
    background-color: #2c3136;
    border-left-color: #5bc0eb;
}

.admin-sidebar-link {
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar-link:hover,
.admin-sidebar-item.active .admin-sidebar-link {
    color: white;
}

.admin-content {
    padding: 20px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
}

.admin-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* 用户角色标识 */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.role-admin {
    background-color: #dc3545;
    color: white;
}

.role-user {
    background-color: #5bc0eb;
    color: white;
}

.role-school {
    background-color: #28a745;
    color: white;
}

/* 审核状态标识 */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-approved {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1100;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.notification-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}